package com.liujiajin.mapper;

import com.liujiajin.entity.CommentEntity;
import com.liujiajin.entity.CommentParam;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CommentMapper {

    /**
     * 添加评论
     * @param comment
     * @return
     */
    int addComment(CommentEntity comment);

    /**
     * 删除评论
     * @param id
     * @return
     */
    int deleteCommentById(Long id);

    /**
     * 逻辑删除
     * @param commentParam
     * @return
     */
    int updateCommentByParam(CommentParam commentParam);

    /**
     * 查询评论
     * @param param
     * @return
     */
    List<CommentEntity> queryCommentByParam(CommentParam param);

    /**
     * 查询评论总数
     * @return
     */
    int countCommentByParam(CommentParam param);
}
